﻿namespace Minotaur.App.Domains.Model.Table
{
    /// <summary>
    /// 表信息
    /// </summary>
    [SugarTable("TableInfo")]
    public class TableInfo : EntityBase
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(ColumnName = "autoid", IsIdentity = true, IsPrimaryKey = true)]
        public virtual long Autoid { get; set; }

        /// <summary>
        /// 表名
        /// </summary>
        [SugarColumn(ColumnName = "tablecode")]
        public virtual string? TableCode { get; set; }

        /// <summary>
        /// 分组类型--人员、组织、职位、自定义
        /// </summary>
        [SugarColumn(ColumnName = "grouptype")]
        public virtual string GroupType { get; set; }

        /// <summary>
        /// 视图类型
        /// </summary>
        [SugarColumn(ColumnName = "viewtype")]
        public virtual int? ViewType { get; set; }

        /// <summary>
        /// 是否是主键表
        /// </summary>
        [SugarColumn(ColumnName = "isprimary")]
        public virtual bool? IsPrimary { get; set; }

        /// <summary>
        /// 主键表
        /// </summary>
        [SugarColumn(ColumnName = "pktable")]
        public virtual string? PkTable { get; set; }

        /// <summary>
        /// 角色ID
        /// </summary>
        [SugarColumn(ColumnName = "enable")]
        public virtual bool? Enable { get; set; }

        /// <summary>
        /// 是否已删除
        /// </summary>
        [SugarColumn(ColumnName = "havedelete")]
        public virtual bool? HaveDelete { get; set; }

        /// <summary>
        /// 是否是系统表
        /// </summary>
        [SugarColumn(ColumnName = "issystem")]
        public virtual bool? IsSystem { get; set; }

        /// <summary>
        /// 用于流程
        /// </summary>
        [SugarColumn(ColumnName = "isflow")]
        public virtual bool? Isflow { get; set; }

        /// <summary>
        /// 记录类型
        /// </summary>
        [SugarColumn(ColumnName = "records")]
        public virtual bool? Records { get; set; }

        /// <summary>
        /// 流程表名
        /// </summary>
        [SugarColumn(ColumnName = "flowtablecode")]
        public virtual string? FlowTableCode { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [SugarColumn(ColumnName = "sequence")]
        public virtual long? Sequence { get; set; }
    }
}
